package com.engine.pattern.player;

/**
 * @author jonathan
 * @author fabienne
 */
public abstract class Player
{
	/**
	 * 
	 */
	private static Integer	playerFn	= 1;
	/**
	 * 
	 */
	private String			name		= null;
	/**
	 * 
	 */
	private Integer			score		= null;
	/**
	 * 
	 */
	private Integer			teamNumber	= null;
	/**
	 * 
	 */
	private Integer			playerId	= null;

	/**
	 * @param name
	 * @param score
	 * @param teamNumber
	 */
	public Player(String name, Integer score, Integer teamNumber)
	{
		this.name = name;
		this.score = score;
		this.teamNumber = teamNumber;
		this.setPlayerId(playerFn);
		playerFn++;
	}

	/**
	 * @return
	 */
	public String getName()
	{
		return name;
	}

	/**
	 * @param name
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * @return
	 */
	public Integer getScore()
	{
		return score;
	}

	/**
	 * @param score
	 */
	public void setScore(Integer score)
	{
		this.score = score;
	}

	/**
	 * @return
	 */
	public Integer getTeamNumber()
	{
		return teamNumber;
	}

	/**
	 * @param teamNumber
	 */
	public void setTeamNumber(Integer teamNumber)
	{
		this.teamNumber = teamNumber;
	}

	/**
	 * @return
	 */
	public static Integer getPlayerFn()
	{
		return playerFn;
	}

	/**
	 * @param playerId
	 */
	public void setPlayerId(Integer playerId)
	{
		this.playerId = playerId;
	}

	/**
	 * @return
	 */
	public Integer getPlayerId()
	{
		return playerId;
	}

	/**
	 * 
	 */
	public void addPoint()
	{
		score++;
	}

}
